#!/bin/bash
CONTAINER_NAME=kafka-manager

# 删除容器
if docker ps -a | grep $CONTAINER_NAME | awk '{print $1 }' ; then
    docker rm -f $CONTAINER_NAME
fi


docker run -d \
    --name $CONTAINER_NAME \
    -p 9000:9000 \
    -e ZK_HOSTS="112.74.114.59:2181" \
    -e APPLICATION_SECRET=letmein \
    sheepkiller/kafka-manager

# logs
docker logs -f $CONTAINER_NAME